<template>
    <div @click="dialogVisible = !dialogVisible" class="wrapper" v-if="pass === 1">
        <div class="title">{{company}}</div>
        <span>注册申请已经通过了</span>
    </div>
    <div class="wrapper" @click="dialogVisible = !dialogVisible" v-else-if="pass === 2">
        <div class="title">{{company}}</div>
        <span>审核不通过:{{option ? option : ""}} </span>
    </div>
    <el-dialog v-model="dialogVisible" title="消息通知" width="30%">
        <span>企业 : {{company}}</span>

        <div v-if="pass === 1">审核信息：注册申请已经通过了</div>
        <div v-else-if="pass === 2">
            <div>状态：不通过</div>
            <div>审核信息: {{option ? option : ""}}</div>
        </div>
        <template #footer>
            <span class="dialog-footer">
                <el-button @click="dialogVisible = false">取消</el-button>
                <el-button type="primary" @click="dialogVisible = false">确认</el-button>
            </span>
        </template>
    </el-dialog>
</template>

<script>
export default {
    props: {
        "pass": Number,
        "company": String,
        "option": String
    },
    data() {
        return {
            dialogVisible: false
        }
    }
}
</script>

<style lang="less" scoped>
.wrapper {
    width: 150px;
    padding: 10px;
    font-size: 16px;
    cursor: pointer;

    &:hover {
        background-color: #eee;
    }

    .title {
        color: #333;
        font-size: 14px;
        margin-bottom: 8px;
    }

    span {
        color: #aaa;
    }
}



.dialog-footer {
    display: flex;
}
</style>